import request from '@/utils/request'

export default {

  // 01 分页获取讲师列表
  getTeacherList(current, limit, teacherQuery) {
    console.log(teacherQuery)
    return request({
      url: `/eduservice/teacher/pageTeacher/${current}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },

  // 02 获取所有讲师列表
  getAll() {
    return request({
      url: `/eduservice/teacher/findAll`,
      method: 'post'
    })
  },

  // 03 通过ID删除讲师
  deleteTeacher(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'post'
    })
  },

  // 04 通过ID查询数据
  showTeacher(id) {
    return request({
      url: `/eduservice/teacher/getTeacher/${id}`,
      method: 'post'
    })
  },

  // 05 通过ID更新数据
  updateTeacher(eduTeacher) {
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: eduTeacher
    })
  },

  // 06 添加讲师
  addTeacher(eduTeacher) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: eduTeacher
    })
  },

  // 07 获取最大的排序号
  getNextSort() {
    return request({
      url: `/eduservice/teacher/getNextSort`,
      method: 'post',
    })
  },

  // 08 批量添加讲师
  saveBatchTeacher(eduTeacher) {
    return request({
      url: `/eduservice/teacher/addTeacher/batch`,
      method: 'post',
      data: eduTeacher
    })
  },

}



